namespace Shumei.EFCore.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class addNews : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.News",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Content = c.String(unicode: false),
                        UploadTime = c.DateTime(nullable: false, precision: 0),
                        user_account = c.String(maxLength: 20, storeType: "nvarchar"),
                    })
                .PrimaryKey(t => t.Id)
                .ForeignKey("dbo.Users", t => t.user_account)
                .Index(t => t.user_account);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.News", "user_account", "dbo.Users");
            DropIndex("dbo.News", new[] { "user_account" });
            DropTable("dbo.News");
        }
    }
}
